<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.STYLE1 {font-size: 12px}
.STYLE3 {font-size: 12px; font-weight: bold; }
.STYLE4 {
	color: #03515d;
	font-size: 12px;
}
-->
</style>

<script>
     function validateForm(){
     var localVar = document.getElementById("adminAction_oldPassword");
      if(localVar.value.length<2||localVar.value.length>12)
       {
           alert("密码输入不正确");
           localVar.focus();
           return false;
       }
     var localVar1 = document.getElementById("adminAction_newPassword1");
      if(localVar1.value.length<5||localVar1.value.length>12)
       {
            alert("密码不能少于5个字符,不能大于12个字符");
           localVar1.focus();
           return false;
       }
      var localVar2 = document.getElementById("adminAction_newPaasword2");
      if(localVar2.value.length<5||localVar2.value.length>12)
       {
            alert("密码不能少于5个字符,不能大于12个字符");
           localVar2.focus();
           return false;
       }
      if(localVar1.value!=localVar2.value){
            alert("两次密码输入不同");
           localVar2.focus();
           return false;
       }
       return true;  
       
     }
    </script>

</head>

<body>
<table width="400" border="0" cellspacing="0" cellpadding="0" align="center">
<tr> <td>&nbsp;</td> </tr>
  <tr>
    <td height="30" background="tab/images/tab_05.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="12" height="30"><img src="tab/images/tab_03.gif" width="12" height="30" /></td>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="80%" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="5%"><div align="center"><img src="tab/images/tb.gif" width="16" height="16" /></div></td>
                <td width="95%" class="STYLE1"><span class="STYLE3">你当前的位置</span>：[系统管理]-[密码修改]</td>
              </tr>
            </table></td>
            <td width="54%">
			    &nbsp;
			</td>
          </tr>
        </table></td>
        <td width="16"><img src="tab/images/tab_07.gif" width="16" height="30" /></td>
      </tr>
    </table></td>
  </tr>
  
  <tr>
      <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="8" background=" tab/images/tab_12.gif">&nbsp;</td>
        <td>
          <s:form  action="adminAction!savePassword.action" method="post" theme="simple" onsubmit="return validateForm();">
		<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="b5d6e6" onmouseover="changeto()"  onmouseout="changeback()">
          
          <tr>          
            <td height="30" bgcolor="#FFFFFF"><div align="right"><span class="STYLE1">管理员名字</span></div></td>
            <td height="30" bgcolor="#FFFFFF"><div align="left"><span class="STYLE1"><s:property value="currentAdmin.realEname"/> </span></div><s:fielderror cssStyle="color:red"><s:param>Password4Error</s:param></s:fielderror></td>
           </tr>
		    <tr>          
            <td height="30" bgcolor="#FFFFFF"><div align="right"><span class="STYLE1">旧密码</span></div></td>
            <td height="30" bgcolor="#FFFFFF"><div align="left"><s:password name="oldPassword"/></div><s:fielderror cssStyle="color:red"><s:param>Password1Error</s:param></s:fielderror></td>
           </tr>
		    <tr>          
            <td height="30" bgcolor="#FFFFFF"><div align="right"><span class="STYLE1">新密码</span></div></td>
            <td height="30" bgcolor="#FFFFFF"><div align="left"><span class="STYLE1"><s:password name="newPassword1"/>(6-12个字符)</span> </div><s:fielderror cssStyle="color:red"><s:param>Password2Error</s:param></s:fielderror></td>
           </tr>
		    <tr>          
            <td height="30" bgcolor="#FFFFFF"><div align="right"><span class="STYLE1">确认新密码</span></div></td>
            <td height="30" bgcolor="#FFFFFF"><div align="left"><span class="STYLE1"><s:password name="newPaasword2"/>(6-12个字符)</span> </div><s:fielderror cssStyle="color:red"><s:param>Password3Error</s:param></s:fielderror></td>
           </tr>
		   <tr>          
            <td height="30" bgcolor="#FFFFFF" colspan="2"><div align="center"><input type="submit"  title="保存"/></div></td>
           </tr>
        </table>
        </s:form>
        </td>
        <td width="8" background="tab/images/tab_15.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
 <!-- <tr>&nbsp;</tr>-->
  <tr>
    <td height="35" background="tab/images/tab_19.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="12" height="35"><img src="tab/images/tab_18.gif" width="12" height="35" /></td>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td class="STYLE4">&nbsp;&nbsp</td>
            <td>&nbsp;</td>
          </tr>
        </table></td>
        <td width="16"><img src="tab/images/tab_20.gif" width="16" height="35" /></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
